/*     */ package com.qmsk.business.member.memberCouponDetail.dao;
/*     */ 
/*     */ import com.qmsk.business.sys.basic.SupportDAO;
/*     */ import com.utils.gson.in.GsonHeadManyRows;
/*     */ import com.utils.gson.in.GsonHeadOneRow;
/*     */ import com.utils.gson.out.GsonEbRst;
/*     */ import java.sql.SQLException;
/*     */ import java.util.Date;
/*     */ import java.util.HashMap;
/*     */ import java.util.Map;
/*     */ 
/*     */ public class MemberCouponDetailDao extends SupportDAO
/*     */ {
/*     */   public GsonEbRst getGsonOfAll(Long memberId, Integer nPageIdx, Short nPageSize)
/*     */     throws SQLException
/*     */   {
/*  37 */     if (nPageIdx.intValue() > 0) {
/*  38 */       nPageIdx = Integer.valueOf(nPageIdx.intValue() - 1);
/*     */     }
/*  40 */     Map params = new HashMap();
/*  41 */     params.put("memberId", memberId);
/*  42 */     return getGsonOfParams("selectSqlWxMemberInfo", params, nPageIdx, nPageSize, true);
/*     */   }
/*     */ 
/*     */   public GsonHeadOneRow getIntAmtMId(Long memberId) throws SQLException {
/*  46 */     Object[] params = { memberId };
/*  47 */     return getOneRowOfParams("selectSqlOfAmt", "selectJsonOfAmt", params);
/*     */   }
/*     */ 
/*     */   public Integer getcashCouPonOfMemberId(Long memberId) throws SQLException {
/*  51 */     Object[] params = { memberId };
/*  52 */     return queryForInt("selectSqlCashCouPonOfMemberId", params, Integer.valueOf(0));
/*     */   }
/*     */ 
/*     */   public int updateIntAmtMemberIt(Integer integral, Long memberID) throws SQLException
/*     */   {
/*  57 */     int status = 0;
/*  58 */     Map params = new HashMap();
/*  59 */     params.put("integral", integral);
/*  60 */     params.put("memberID", memberID);
/*  61 */     params.put("status", Integer.valueOf(status));
/*  62 */     return update("updateSqlIntAmtMemberIt", params);
/*     */   }
/*     */ 
/*     */   public int updateCashCouponMemberCs(Double cashCpon, Long memberID, Long detailId) throws SQLException
/*     */   {
/*  67 */     int status = 0;
/*  68 */     Map params = new HashMap();
/*  69 */     params.put("cashCpon", cashCpon);
/*  70 */     params.put("memberID", memberID);
/*  71 */     params.put("status", Integer.valueOf(status));
/*  72 */     params.put("detailId", detailId);
/*  73 */     return update("updateCashCouponMemberCs", params);
/*     */   }
/*     */ 
/*     */   public int updateCashCopDtlStatusOfIDFs(Long memberId, Long detailId, Double cashCop) throws SQLException
/*     */   {
/*  78 */     Object[] params = { cashCop, detailId, memberId };
/*  79 */     return update("updateCashCopDtlStatusOfIDFs", params);
/*     */   }
/*     */ 
/*     */   public int insertCashCoupDtialCash(Long memberId, Long shopId, Double FaceValue, Integer mberVday, Object inFrom, Object billId)
/*     */     throws SQLException
/*     */   {
/*  85 */     if ((mberVday.intValue() == 0) && (mberVday != null)) {
/*  86 */       mberVday = Integer.valueOf(10);
/*  87 */       Object[] params = new Object[] { memberId, shopId, FaceValue, 
/*  88 */         mberVday, mberVday, inFrom, billId };
/*  89 */       return update("insertSqlCashCoupDtialCashToYear", params);
/*     */     }
/*     */ 
/*  92 */     Object[] params = { memberId, shopId, FaceValue, 
/*  93 */       mberVday, mberVday, inFrom, billId };
/*  94 */     return update("insertSqlCashCoupDtialCash", params);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfmemberID(String memberID, String shopId)
/*     */     throws SQLException
/*     */   {
/* 101 */     Map params = new HashMap();
/* 102 */     params.put("memberId", memberID);
/* 103 */     params.put("status", Integer.valueOf(0));
/* 104 */     params.put("shopId", shopId);
/* 105 */     return getGsonOfParams("selectSqlOfAll", "selectJsonOfHead", params);
/*     */   }
/*     */ 
/*     */   public GsonHeadManyRows getSelectCashCouponDtialRslt(Object memberId, Object shopId) throws SQLException
/*     */   {
/* 110 */     int status = 0;
/* 111 */     Map params = new HashMap();
/* 112 */     params.put("status", Integer.valueOf(status));
/* 113 */     params.put("memberId", memberId);
/* 114 */     params.put("shopId", shopId);
/* 115 */     return getManyRowsOfParams("selectSqlPaidDetailID", 
/* 116 */       "selectJsonPaidDetailID", params);
/*     */   }
/*     */ 
/*     */   public int updateCashCouponDtlStatusOfID(Long memberId, Long detailId) throws SQLException
/*     */   {
/* 121 */     Object[] params = { detailId, memberId };
/* 122 */     return update("updateCashCouponDtlStatusOfID", params);
/*     */   }
/*     */ 
/*     */   public Double selectSqlCashCouponDtlSum(Long memberId) throws SQLException {
/* 126 */     Object[] params = { memberId };
/* 127 */     return queryForDouble("selectSqlCashCouponDtlSum", params, Double.valueOf(0.0D));
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfmemberId(Long memberId) throws SQLException {
/* 131 */     Object[] params = { memberId };
/* 132 */     return getGsonOfParams("selectSqlOfmemberId", "selectJsonOfmemberId", params);
/*     */   }
/*     */ 
/*     */   public int deleteCashCop(Long memberId, Long shopId, Long billId) throws SQLException {
/* 136 */     Object[] params = { memberId, shopId, billId };
/* 137 */     return update("deletecashCop", params);
/*     */   }
/*     */ 
/*     */   public boolean isMemberCoupDt(Long memberId, Long shopId, Long id) throws SQLException {
/* 141 */     Object[] params = { memberId, shopId, id };
/* 142 */     return queryForBoolean("isMemberCoupDt", params, Boolean.valueOf(false)).booleanValue();
/*     */   }
/*     */ 
/*     */   public int updateMemberConpDt(Long memberId, Long shopId, Long id) throws SQLException {
/* 146 */     Object[] params = { memberId, shopId, id };
/* 147 */     return update("updateMemberConpDt", params);
/*     */   }
/*     */ 
/*     */   public int insertMemberConpCsm(Long id)
/*     */     throws SQLException
/*     */   {
/* 154 */     Object[] params = { new Date(), id };
/* 155 */     return update("insertMemberConpCsm", params);
/*     */   }
/*     */ }

/* Location:           C:\Users\Administrator\Desktop\新建文件夹\WEB-INF\classes\
 * Qualified Name:     com.qmsk.business.member.memberCouponDetail.dao.MemberCouponDetailDao
 * JD-Core Version:    0.5.3
 */